#include "navButton.h"
#include "input.h"

NavButton::NavButton(){

name="navButton";
tooltip="click to navigate";
}

NavButton::~NavButton(){

}

void NavButton::clickedLeft(){

RotateButton::clickedLeft();
input->controller->toggleFlyMode();
}

void NavButton::toggle(){

    if (bActive)
     focusClick();
    else
     clickedLeft();
}

void NavButton::focusClick(){

RotateButton::focusClick();
input->controller->toggleFlyMode();

//set back cursor position to the icon we clicked on
SetCursorPos(input->windowX+int(location.x+scale.x/2), input->windowY+int(location.y+scale.y/2));
}

void NavButton::create(){

renderer->addButton(this);
std::cout << "creating a navButton!";
}
